//
//  Log.swift
//  zhende
//
//  Created by 陆文宇 on 2017/6/26.
//  Copyright © 2017年 chenliang. All rights reserved.
//

import UIKit

func yy_Log(_ items: Any...) {
    print(items)
}

func yy_reportException(name: String, reason: String?, userInfo: [AnyHashable: Any]?) {
    let exception = NSException(name: NSExceptionName(name), reason: reason, userInfo: userInfo)
    Bugly.report(exception)
}

func yy_reportException(_ exception: NSException) {
    Bugly.report(exception)
}

func yy_reportError(domain: String, code: Int, userInfo: [String: Any]?) {
    let error = NSError(domain: domain, code: code, userInfo: userInfo)
    Bugly.reportError(error)
}

func yy_reportError(_ error: Error) {
    Bugly.reportError(error)
}

func yy_LogError(_ fmt: String) {
    ZDBuglyLog.blyLogError(fmt)
}

func yy_LogWarn(_ fmt: String) {
    ZDBuglyLog.blyLogWarn(fmt)
}

func yy_LogInfo(_ fmt: String) {
    ZDBuglyLog.blyLogInfo(fmt)
}

func yy_LogDebug(_ fmt: String) {
    ZDBuglyLog.blyLogDebug(fmt)
}

func yy_LogVerbose(_ fmt: String) {
    ZDBuglyLog.blyLogVerbose(fmt)
}

func yy_Log(_ level: BuglyLogLevel, _ fmt: String) {
    ZDBuglyLog.blyLog(level, fmt)
}

func yy_Logv(_ level: BuglyLogLevel, _ fmt: String, _ args: CVaListPointer) {
    ZDBuglyLog.blyLogv(level, fmt, args)
}
